package com.ruoyi.central.domain;

import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.enums.common.State;
import com.baomidou.mybatisplus.annotation.*;
import com.ruoyi.common.validation.group.InsertGroup;
import com.ruoyi.common.validation.group.UpdateGroup;
import lombok.Data;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 任务执行指令对象 top_central_operation_station_material_log
 *
 * @author SunLuQuan
 * @date 2022-06-29
 */
@Data
@TableName("top_central_operation_station_material_log")
public class TopCentralOperationStationMaterialLog extends BaseEntity {

    private static final long serialVersionUID = 1L;

    public TopCentralOperationStationMaterialLog() {
    }

    public TopCentralOperationStationMaterialLog(Integer operationStationId, String materialId) {
        this.operationStationId = operationStationId;
        this.materialId = materialId;
    }

    /** 编号 */
    @TableId
    @Length(min=0,max=10,message="编号 数据长度不能大于 10")
    private Integer id;

    /** 操作工位编号 */
    @Excel(name = "操作工位编号")
    @NotNull(groups = {InsertGroup.class,UpdateGroup.class},message = "操作工位编号不能为空")
    @Length(min=0,max=10,message="操作工位编号 数据长度不能大于 10")
    private Integer operationStationId;

    /** 操作工位名称 */
    @Excel(name = "操作工位名称")
    @NotBlank(groups = {InsertGroup.class,UpdateGroup.class},message = "操作工位名称不能为空")
    @Length(min=0,max=50,message="操作工位名称 数据长度不能大于 50")
    private String operationStationName;

    /** 物料编号 */
    @Excel(name = "物料编号")
    @NotBlank(groups = {InsertGroup.class,UpdateGroup.class},message = "物料编号不能为空")
    @Length(min=0,max=50,message="物料编号 数据长度不能大于 50")
    private String materialId;

    /** 物料类型名称 */
    @Excel(name = "物料类型名称")
    @NotBlank(groups = {InsertGroup.class,UpdateGroup.class},message = "物料类型名称不能为空")
    @Length(min=0,max=50,message="物料类型名称 数据长度不能大于 50")
    private String materialTypeName;

    /**表中没有的字段*/
    @TableField(exist = false)
    private Integer weight;

    @TableField(exist = false)
    private State state;

}
